How is deadlock detected
- Detecting a deadlock that has already occurred is easily possible since the resources that each process has locked and/or currently requested are known to the resource scheduler or OS.
- Deadlock detection and process restart are used by employing an algorithm that tracks resource allocation and process states, and rolls back and restarts one or more of the processes.
- In Operating Systems a special resource-allocation graph algorithm can also be used to detect whether there is any deadlock in the system. A resource-allocation graph is a directed graph consisting of two different types of nodes